home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / ViewIt™ 2.24 Shareware / FaceWare / FaceWare.rsrc / TEXT_1278_U5. Alert Utilities.txt < prev    next >
Text File  |  1994-04-10  |  3KB  |  33 lines

  1. U5. Alert Utility Commands
  2.   ViewIt provides support for opening standard Mac alerts and a simpler, string-based form of alert.  Many programmers, however, simply use modal ViewIt windows as alerts, thereby avoiding the use of the ALRT and DITL resources required by standard alerts.
  3.  
  4. Name  Number  Parameters & Variables used
  5. ShoAlt  153  a,b,c,d,uString,uResult
  6. StpAlt  154  a,b,c,d,uString,uResult
  7. NotAlt  155  a,b,c,d,uString,uResult
  8. CtnAlt  156  a,b,c,d,uString,uResult
  9.   Opens an alert using the Alert, StopAlert, NoteAlert, or CautionAlert toolbox calls.  The parameters a, b, c, and d have the same meaning as those used with MovAlt (described in "Window Utilities").  If uString is not empty, then the first parameter text string is set equal to it (the ^0 item, if any, in the DITL list).  The number of the enabled item pressed by the user to close the alert is returned in uResult.  If the ALRT resource is not found, uResult returns zero.
  10.   If you prefer using SetPrm (described in "String Utilities") or the toolbox call ParamText to set parameter text strings in an alert, be careful to reset uString to an empty string just before calling ShoAlt...CtnAlt, otherwise the contents of uString will be put in the first parameter string.
  11.   WARNING:  ViewIt's positioning of alerts via parameters c and d conflicts with the System 7 "Auto Position" option seen in ResEdit, so do not set this option for ALRT resources that will be positioned by ViewIt.
  12.   FORTRAN NOTE:  To set a string such as uString in FORTRAN to an empty string, set the string equal to a single space.
  13.  
  14. ShoStr  261  a,b,c,d,uString
  15. StpStr  262  a,b,c,d,uString
  16. NotStr  263  a,b,c,d,uString
  17. CtnStr  264  a,b,c,d,uString
  18.   Creates a temporary window on the main screen in which the message in uString is displayed.  StpStr, NotStr, and CtnStr also display, respectively, the standard Stop, Note, and Caution icons.  Carriage returns and spaces can be used within uString to adjust the appearance of the string.  The next mouse or key press will cause the window to be hidden and disposed of.  If uString is empty, then ViewIt just beeps once without displaying a window.
  19.   The appearance of the string in the window is governed by parameters a, b, c, and d:
  20.   a = font number
  21.   b = size (12 pt. if b = 0)
  22.   c = style (low word) and color (hi word)
  23.     style = sum of following constants:  0 = Plain,
  24.       1 = Bold, 2 = Italic, 4 = Underline, 8 = Outline,
  25.       16 = Shadow, 32 = Condensed, 64 = Extended
  26.     color = one of following constants:
  27.       0 or 33 = black, 30 = white, 205 = red, 341 = green,
  28.       409 = blue, 273 = cyan, 137 = magenta, 69 = yellow
  29.   d = screen position
  30.    -2 = centered above front modal or active modeless
  31.     0 = centered horizontally on main screen
  32.     other = global position (hi word = v, lo word = h)
  33. where c should be calculated as:  c = style + color*65536.